package touchtrack.exception;

/**
 * IllegalDuplicationException
 * 
 * Exception class.
 * Thrown when an mp3 file doesn't have enough metadata.
 * 
 * @author	MuMe09 team 6
 * 			http://mumetech.wordpress.com/
 */
public class NotEnoughMetaDataException extends Throwable 
{
	/**
	 * Initializes an IllegalDuplicationException with the given description.
	 * 
	 * @param	artist
	 * @param	track
	 * @effect	Sets the artist.
	 * @effect	Sets the track.
	 */
	public NotEnoughMetaDataException(String artist, String track)
	{
		this.artist = artist;
		this.track = track;
	}

	/**
	 * Returns an error message that can be used in the UI.
	 * 
	 * @return	An error message.
	 */
	public String toString()
	{
		return "The metadata of the MP3 file should at least contain information about the artist name and the track title!\n\n"
		+ "MP3 artist name read: " + artist + "\nMP3 track title read: " + track;
	}
	
	private String artist;
	private String track;
	private static final long serialVersionUID = 1L;
}